<extend name="Base:main" />
<block name="script">
	<link rel="stylesheet" href="__PUBLIC__/seller/css/validform.css" />
	<script src="__PUBLIC__/seller/js/Validform_v5.3.2.js"></script>
</block>
<block name="content">
     <div class="tpl-content-wrapper">
            <div class="tpl-content-page-title">
               订单详情
            </div>
            <ol class="am-breadcrumb">
                <li><a href="#" class="am-icon-home">首页</a></li>
                <li><a href="#">订单管理</a></li>
                <li class="am-active">订单详情</li>
            </ol>
            <div class="tpl-portlet-components">
              <div class="portlet-title" style="min-height: 60px!important;">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> 订单详情
                    </div>
                   <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-inline">
                          
                            <span>订单编号:</span>
                            <span style="color: #dd5a43 !important;">{$val.ref}</span>
                            <br>
                            <span class="invoice-info-label">订单日期:</span>
                            <span style="color: #478fca !important;">{$val.date_order}</span>
                        </div>
                    </div>
                     <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input  input-inline">
                           
                                <a href="javascript:printme()" target="_self">
                                        <i class="icon-print">打印订单</i>
                                </a>
                         
                         </div>
                    </div>
                   


                </div>
              	<style>
                    .contect_list_info{ width:93%; margin-top:10px; }
                    .contect_list_info dl{ width:100%; float:left;font-size:14px; margin:0px; border-bottom:1px dashed #ccc;word-break: break-all; word-wrap:break-word;-webkit-box-flex: 1; overflow:hidden;}
                    .contect_list_info dl dt{ width:100px; float:left; color:#666;line-height:230%; text-align:right}
                    .contect_list_info dl dd{color:#999;line-height:220%; text-indent:1em;}
					dt+dd{ margin-top:0px !important;}
                    .list_width{ width:50% !important; }
             </style>
                
                <div class="tpl-block ">
                    <div class="am-g tpl-amazeui-form">
                        <div class="am-u-sm-12 am-u-md-6">
                            <div style="text-align: center;background-color: #3a87ad;">
                                   <b>订单基本信息</b> 
                           </div>
                           <div class='contect_list_info'>
                                <dl class="list_width">
                                        <dt>来源平台：</dt>
                                    <dd><empty name="platform_name">平台订单<else />{$platform_name}</empty></dd>
                                </dl>
                                <dl class="list_width">
                                        <dt>创建时间：</dt>
                                    <dd>&nbsp;{$val.create_time}</dd>
                                </dl>
                                <span style=" clear:both"></span>
                             </div>
			</div>
                        <div class="am-u-sm-12 am-u-md-6">
                            <div style="text-align: center;background-color: #82af6f;">
                                   <b>收货人信息</b>
                            </div>
                            <div class='contect_list_info'>
								<?php $receive_info = explode('|' , $val['receive_info']); ?>
                                <dl class="list_width">
                                        <dt>收货人姓名：</dt>
                                    <dd>&nbsp;{$receive_info[0]}</dd>
                                </dl>
                                <dl class="list_width">
                                        <dt>联系电话：</dt>
                                    <dd>&nbsp;{$receive_info[2]}</dd>
                                </dl>
                                <dl class="list_width">
                                        <dt>身份证号码：</dt>
                                    <dd>{$receive_info[1]}</dd>
                                </dl>
								<dl class="list_width">
                                        <dt>地区：</dt>
                                    <dd>{$receive_info[3]} - {$receive_info[4]} - {$receive_info[5]} - {$receive_info[6]}</dd>
                                </dl>
                                <dl>
                                        <dt>收货信息：</dt>
                                    <dd>&nbsp;{$receive_info[7]}</dd>
                                </dl>
                            </div>
                            
			</div>
                        
		    </div>
                     <div class="am-g" style="margin-top:20px;">
                        <div class="am-u-sm-12">
                            <table class="am-table am-table-bordered  table-main am-table-bordered am-table-radius">
                            <thead>
                                    <tr>
                                            <th>earn13</th>
                                            <th>名称</th>
                                            <th>单价</th>
                                            <th>供货价</th>
                                            <th>购买数量</th>
                                            <th>商品总价</th>
                                            <th>支付状态</th>
                                            <th>已支付金额</th>
                                            <th>物流公司</th>
                                            <th>物流单号</th>
                                            <th>发货时间</th>
                                            <th>是否发货</th>
                                    </tr>
                            </thead>

                            <tbody>
                                <volist name="val.order_line" id="vo">
                                	<?php $ids[] = $vo['id']; ?>
                                        <tr>
                                                <td>{$vo.earn13}</td>
                                                <td>{$vo.name}</td>
                                                <td>{$vo.price}</td>
                                                <td>{$vo.supply_price}</td>
                                                <td>{$vo.num}</td>
                                                <td><?php echo $vo['sub_total']; ?></td>
                                                <td><switch name="vo.pay_status"><case value="0">未支付</case><case value="1">已支付</case><case value="2">退款失败</case><case value="3">退款成功</case></switch></td>
												<td>{$vo.surely_total}</td>
												<empty name="vo.express_name">
												<td>-</td>
												<td>-</td>
												<td>-</td>
												<td>
													未发货
												</td>
												<else />
                                                <td>{$vo.express_name}</td>
                                                <td>{$vo.express_no}</td>
                                                <td>{:date('Y-m-d H:i:s' , $vo['send_time'])}</td>
												<td>
													已发货
												</td>
												</empty>
                                        </tr>
                                </volist>															
							</tbody>
                            </table>
                            </div>
                            <empty name="val.express_name">
							<a class="am-btn am-btn-danger" style=" margin-left:42%;" href="{:U('delivery' , array('ref' => $val['ref']))}"  width="600" height="455" menu="load_iframe_url" title="填写物流发货信息"> 订单确认发货 </a>
                            </empty>
                         </div>
                    <style>
                        .hr {
                            display: block;
                            height: 0;
                            overflow: hidden;
                            font-size: 0;
                            border-width: 1px 0 0 0;
                            border-top: 1px solid #E3E3E3;
                            margin: 12px 0;
                            border-top-color: rgba(0, 0, 0, 0.11);
                          }
                          .hr-double {
                            height: 3px;
                            border-top: 1px solid #E3E3E3;
                            border-bottom: 1px solid #E3E3E3;
                            border-top-color: rgba(0, 0, 0, 0.11);
                            border-bottom-color: rgba(0, 0, 0, 0.11);
                          }
                          .hr-8,
                            .hr8 {
                              margin: 8px 0;
                            }
                          .hr.dotted,.hr-dotted {
                            border-style: dotted;
                          }
                    </style>
                    <div class="hr hr8 hr-double hr-dotted"></div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input  input-inline">
                                <span>快递邮费:</span>
                                <span style="color: #478fca !important;">
                                    <eq name="val.delivery_fee" value="0"> 包邮<else /> ${$val.delivery_fee} 元</eq><br>
                                    <neq name="val.discount" value="0">优惠金额 ： ${$val.discount}<br></neq></span>
                                <span class="invoice-info-label">订单总价:</span>
                                <span style="color: #dd5a43 !important;">${$val.sub_total} 元</span> 

                         </div>
                    </div>
					
					
					<style>
                        .pay_ment_info{ width:100%; margin-top: 40px; }
                        .pay_ment_info dl dt{ width:100%; height:40px; line-height:40px; font-size:16px; border-bottom:1px solid #ccc; text-indent:10px;}
                        .pay_ment_info dl dd{ float:left; line-height:220%; width:100%; text-indent:20px; color:#666 }
                        .pay_ment_info dl dd span{ color:#333; }
                    </style>
                  
                    <div class="pay_ment_info">
                        <dl>
                            <dt>分销商支付信息</dt>
                            <?php if( $login_info['id'] == $val['distribution_customer_id'] ) : ?>
                            <dd><span>是否支付：</span><eq name="val.payment_info.pay_status" value="0"><span style="color:red">未支付</span><else />已支付</eq></dd>
                            <?php else : ?>
                            <dd><span>是否支付：</span><eq name="val.payment_info.pay_status" value="0"><span style="color:red">未支付</span><else />已支付</eq></dd>
                            <eq name="val.payment_info.pay_status" value="1">
                            <dd><span>支付方式：</span>
                                <switch name="val.payment_info.pay_type">
                                        <case value="Weixin">微信</case>
                                        <case value="Alipay">支付宝</case>
                                        <case value="Pcupacp">银联</case>
                                </switch>
                            </dd>
                            <dd><span>支付金额：</span>{$val.payment_info.pay_money}</dd>
                            <dd><span>支付流水号：</span>{$val.payment_info.payment_no}</dd>
                            <dd><span>支付成功时间：</span>{:date('Y-m-d H:i:s', $val['payment_info']['pay_time'])}</dd>
                            <?php endif; ?>
                        </dl>
                    </div>
	        </div>
	    </div>
    </div>
    <script>
		function send_notify() {
			zeroModal.closeAll();
			location.reload();
		}
	</script>
</block>

